<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>simGetStackTableInfo</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1>Regular API function</h1>
<h3 class=subsectionBar><a name="simGetStackTableInfo" id="simGetStackTableInfo"></a>simGetStackTableInfo</h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>Tries to retrieve information about a possible table at the top of the stack. See also the <a href="../apiFunctions.htm#stacks">other stack functions</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn>simInt simGetStackTableInfo(simInt stackHandle,simInt infoType)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam>
<div><strong>stackHandle</strong>: a stack handle obtained with <a href="simCreateStack.htm">simCreateStack</a>.</div>
<div><strong>infoType</strong>: the type of information desired:</div>
<div class=tab><strong>0</strong>: whether we have a table, whether the table is an array-type or map-type, and the size of the array-type table</div>
<div class=tab><strong>1</strong>: whether the table contains only null values.</div>
<div class=tab><strong>2</strong>: whether the table contains only number values.</div>
<div class=tab><strong>3</strong>: whether the table contains only boolean values.</div>
<div class=tab><strong>4</strong>: whether the table contains only string values.</div>
<div class=tab><strong>5</strong>: whether the table contains only table values.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
<div>-1 in case of an error, otherwise one of following:</div>
<div class=tab>if <em>infoType</em> is 0:</div>
<div class=tabTab><em>sim_stack_table_circular_ref</em> (-4): the value at the top of the stack is a circular reference table (is set to an empty table)</div>
<div class=tabTab><em>sim_stack_table_not_table</em> (-3): the value at the top of the stack is not a table</div>
<div class=tabTab><em>sim_stack_table_map</em> (-2): the value at the top of the stack is a map-type table, containing value-key pairs, where the keys are not all numbers, not all consecutive, or not starting at 1. Use <a href="simUnfoldStackTable.htm">simUnfoldStackTable</a> to read the content of the table.</div>
<div class=tabTab><em>sim_stack_table_empty</em> (0): the value at the top of the stack is an empty table.</div>
<div class=tabTab>a value>0: the value at the top of the stack is an array-type table, containing value-key pairs, where all the keys are numbers, consecutive, and starting at 1. Use <a href="simUnfoldStackTable.htm">simUnfoldStackTable</a>, <a href="simGetStackUInt8Table.htm">simGetStackUInt8Table</a>, <a href="simGetStackInt32Table.htm">simGetStackInt32Table</a>, <a href="simGetStackFloatTable.htm">simGetStackFloatTable</a> or <a href="simGetStackDoubleTable.htm">simGetStackDoubleTable</a> to read the content of the table.</div>
<div class=tab>if <em>infoType</em> is 1: 1 if the table contains only null values</div>
<div class=tab>if <em>infoType</em> is 2: 1 if the table contains only number values</div>
<div class=tab>if <em>infoType</em> is 3: 1 if the table contains only boolean values</div>
<div class=tab>if <em>infoType</em> is 4: 1 if the table contains only string values</div>
<div class=tab>if <em>infoType</em> is 5: 1 if the table contains only table values</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn><div></div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div></div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div></div></td> 
</tr> 
</table> 


<br>
</td>
</tr>
</table>
</div>
</body>
</html>
